<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  <title>Title</title>
  <link rel="stylesheet" href="stylesheets/reset.css">
  <link rel="stylesheet" href="stylesheets/index.css">
</head>
<body>

<div id="box">
  <div id="app1">
    <h1>{{ message }}</h1>
  </div>
  <hr>
  <div id="app2">
    <h1>{{ message }}</h1>
  </div>
  <button @click="updateMsg">修改message</button>
</div>
<script src="js/vue.js"></script>
<script>
  // console.log(Vue)

  const app = new Vue({
    el: '#box',
    data: {
      message: 'Hello Vue!'
    },
    methods: {
      updateMsg:function () {
        this.message = '已经被修改'
      }
    }
  })

</script>
</body>
</html>
